/**
 * 
 */
$(function() {
	var param={type:1,userName: $("#userSearch").val(),operation:$("#optSearch").val(),startDate:$("#startSearch").val(),endDate:$("#endSearch").val()};
	pagination({total:parseInt($("#total").val()),size:parseInt($("#size").val()),currentpage:parseInt($("#page").val()),visibPage:3,pagePath:'log'},param);
	$('#log-ser').on('click', function(e) {
		e.preventDefault();
		var diag = new $.Zebra_Dialog({
			source : {
				'iframe' : {
					'src' : 'ietm/ietm-log-search.html',
					'height' : 450,
					'id':'logdialog'
				}
			},
			width : 600,
			title : '高级搜索',
			buttons : [{caption: '确定',callback:function(){
				var param2=$("#logdialog").contents().find("#logform").serializeObject();
				param2.type="1";
				$("#frameReft").load("log",param2);
			} 
			}]
		});
	});

});

function logSearch(){
	$("#frameReft").load("log",{type:1,userName: $("#userSearch").val()});
	//pagination({total:parseInt($("#total").val()),size:parseInt($("#size").val()),currentpage:parseInt($("#page").val()),visibPage:3,pagePath:'ietm-log'});
}
$.fn.serializeObject = function(){
	var o = {};
	var a = this.serializeArray();
	$.each(a, function() {
		if (o[this.name] !== undefined) {
			if (!o[this.name].push) {
				o[this.name] = [o[this.name]];
			}
			o[this.name].push(this.value || '');
		} else {
			o[this.name] = this.value || '';
		}
	});
	return o;
};